import request from '@/utils/request'

const testApi = {
  getUsageHostInfo: getUsageHostInfo,
  getTaskAllocationChartData: getTaskAllocationChartData,
  getExpenseLists: getExpenseLists,
  chooseSet: chooseSet,

  getHostNums: getHostNums,
  getGailanInfo: getGailanInfo,
  getAbnormalDataList: getAbnormalDataList,
  getManufacturerChartData: getManufacturerChartData,
  getCpuChartData: getCpuChartData,
  getDiskChartData: getDiskChartData,
  getMemoryChartData: getMemoryChartData,
  getPerformanceChartData: getPerformanceChartData,
  getLineChartByOrgName: getLineChartByOrgName,
  getAlarmTableData: getAlarmTableData,

  getAbnormalInfoList: getAbnormalInfoList,
  getEventResponseChartData: getEventResponseChartData,
  getIllegalInfoList: getIllegalInfoList,
  getIllegalPublicityChartData: getIllegalPublicityChartData,
  getTransactionInfoList: getTransactionInfoList,
  getSupplierList: getSupplierList,
  getSupplierInfoById: getSupplierInfoById,
  searchHostInfoById: searchHostInfoById,
  getHostChartsById: getHostChartsById

}
// kt2/taskAllocation
function getUsageHostInfo() {
  return request({
    url: `/cloud/v1.0/kt2/taskAllocation/getUsageHostInfo`,
    method: 'get'
  })
}
function getTaskAllocationChartData() {
  return request({
    url: `/cloud/v1.0/kt2/taskAllocation/getTaskAllocationChartData`,
    method: 'get'
  })
}

function getExpenseLists() {
  return request({
    url: `/cloud/v1.0/kt2/taskAllocation/getExpenseLists`,
    method: 'get'
  })
}

function chooseSet(data) {
  return request({
    url: `/cloud/v1.0/kt2/taskAllocation/chooseSet`,
    data: data,
    method: 'post'
  })
}

// kt3/screen
function getHostNums() {
  return request({
    url: `/cloud/v1.0/kt3/screen/getHostNums`,
    method: 'get'
  })
}

function getGailanInfo() {
  return request({
    url: `/cloud/v1.0/kt3/screen/getGailanInfo`,
    method: 'get'
  })
}
function getManufacturerChartData() {
  return request({
    url: `/cloud/v1.0/kt3/screen/getManufacturerChartData`,
    method: 'get'
  })
}

function getCpuChartData(params) {
  return request({
    url: `/cloud/v1.0/kt3/screen/getCpuChartData`,
    method: 'get',
    params: params
  })
}

function getDiskChartData(params) {
  return request({
    url: `/cloud/v1.0/kt3/screen/getDiskChartData`,
    method: 'get',
    params: params
  })
}

function getMemoryChartData(params) {
  return request({
    url: `/cloud/v1.0/kt3/screen/getMemoryChartData`,
    method: 'get',
    params: params
  })
}

function getPerformanceChartData(params) {
  return request({
    url: `/cloud/v1.0/kt3/screen/getPerformanceChartData`,
    method: 'get',
    params: params
  })
}

function getLineChartByOrgName(params) {
  return request({
    url: `/cloud/v1.0/kt3/screen/getLineChartByOrgName`,
    method: 'get',
    params: params
  })
}

function getAlarmTableData(params) {
  return request({
    url: `/cloud/v1.0/kt3/screen/getAlarmTableData`,
    method: 'get',
    params: params
  })
}

function getAbnormalDataList() {
  return request({
    url: `/cloud/v1.0/kt3/screen/getAbnormalDataList`,
    method: 'get'
  })
}

// kt3/eventResponse
function getAbnormalInfoList() {
  return request({
    url: `/cloud/v1.0/kt3/eventResponse/getAbnormalInfoList`,
    method: 'get'
  })
}

function getEventResponseChartData() {
  return request({
    url: `/cloud/v1.0/kt3/eventResponse/getEventResponseChartData`,
    method: 'get'
  })
}

// kt3/illegalPublicity
function getIllegalInfoList() {
  return request({
    url: `/cloud/v1.0/kt3/illegalPublicity/getIllegalInfoList`,
    method: 'get'
  })
}

function getIllegalPublicityChartData() {
  return request({
    url: `/cloud/v1.0/kt3/illegalPublicity/getIllegalPublicityChartData`,
    method: 'get'
  })
}

// kt3/supplierManagement
function getTransactionInfoList() {
  return request({
    url: `/cloud/v1.0/kt3/supplierManagement/getTransactionInfoList`,
    method: 'get'
  })
}
function getSupplierList() {
  return request({
    url: `/cloud/v1.0/kt3/supplierManagement/getSupplierList`,
    method: 'get'
  })
}

function getSupplierInfoById(params) {
  return request({
    url: `/cloud/v1.0/kt3/supplierManagement/getSupplierInfoById`,
    method: 'get',
    params: params
  })
}
// kt3/hostPerformance
function searchHostInfoById(params) {
  return request({
    url: `/cloud/v1.0/kt3/hostPerformance/searchHostInfoById`,
    method: 'get',
    params: params
  })
}
function getHostChartsById(params) {
  return request({
    url: `/cloud/v1.0/kt3/hostPerformance/searchHostInfoById`,
    method: 'get',
    params: params
  })
}
export default testApi
